package com.github.prontera.domain.enums;

import com.github.prontera.common.mybatis.handler.CodeEnum;

public enum PayTypeEnum implements CodeEnum<PayTypeEnum> {

	VIP(0, "VIP"),RECHARGE_BEAN(1, "RECHARGE_BEAN"),ACTIVITY(2, "ACTIVITY"),RECHARGE(3, "RECHARGE"),LOOK_WECHAT(4, "LOOK_WECHAT"),TALENT(5, "TALENT"),LOOK_COTERIE(6, "LOOK_COTERIE")
	,LOOK_VIDEO(7, "LOOK_VIDEO"),ISSUE_PAY(8, "ISSUE_PAY"),TAKS_DEPOSIT_AMOUNT(9, "TAKS_DEPOSIT_AMOUNT");

	private int code;
	private String desc;

	private PayTypeEnum(int code, String desc) {
		this.code = code;
	}

	/**
     * 通过枚举<code>name</code>获取枚举
     */
    public static PayTypeEnum getEnumByCode(Integer code) {
    	if(code==null){
    		return null;
    	}
        for (PayTypeEnum enumm : PayTypeEnum.values()) {
            if (enumm.getCode()==code.intValue()) {
                return enumm;
            }
        }
        return null;
    }
    
	@Override
	public int getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}
	
}
